// callback: cmd_create

// callback function:
void cmd_create(istringstream &ss) {
  string fin,fdname;
  if(ss>>fin) {
    ss>>fdname;
    if(!file_exist(fin)) throw "file not found";
    
    if(search_fd(fdname)>=0) {
      say("deleting previously created domain\n");
      delete_fd(search_fd(fdname));
    }
    
    fd.push_back(new DriftDomain(fin,fdname));    
    current=fd.size()-1;
    
    fd[current]->solver->EnableDelta();
    fd[current]->solver->EnableTally();
    fd[current]->solver->KeepSource();
        
    say("created domain: "+fd[current]->name);
  } else throw "filename required";
} 
